package Shape;

public class Rectangle extends Shape {
    double length1;
    double length2;

    public Rectangle(double length1, double length2) {
        this.length1 = length1;
        this.length2 = length2;
    }

    @Override
    public double getOutline() {
        return (length1 + length2) * 2;
    }

    @Override
    public double getArea() {
        return length1 * length2;
    }

    @Override
    public String toString() {
        return "Rectangle{" +
                "length1=" + length1 +
                ", length2=" + length2 +
                '}';
    }


}
